const mongoose = require('mongoose');
mongoose.Promise = Promise;
mongoose.connect("mongodb://localhost/mypicture");
const db = mongoose.connection;
db.on('error',function(err){
	console.log('数据库连接失败',err)
})
db.on('open',function(err){
	console.log('数据库连接成功')
});
const User = mongoose.model("users",{
	name:String,
	password:String
})
module.exports.User = User;